import request from '@/utils/request'

export function getAllOrgType() {
  return request({
    url: '/organization/type/all/',
    method: 'get'
  })
}

export function addOrgType(typeName, state) {
  return request({
    url: '/organization/type/append',
    method: 'post',
    data: {
      typeName: typeName,
      state: state
    }
  })
}

export function deleteOrgType(id) {
  return request({
    url: '/organization/type/remove',
    method: 'post',
    data: {
      typeId: id
    }
  })
}

export function updateOrgType(id, typeName, state) {
  return request({
    url: '/organization/type/update',
    method: 'post',
    data: {
      id: id,
      typeName: typeName,
      state: state
    }

  })
}
